//
//  UIColor+Expanded.h
//  ChartsDemo
//
//  Created by Kary on 2022/10/2.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, IHGradientChangeDirection) {
    IHGradientChangeDirectionLevel,
    IHGradientChangeDirectionVertical,
    IHGradientChangeDirectionUpwardDiagonalLine,
    IHGradientChangeDirectionDownDiagonalLine,
    IHGradientChangeDirectionHorizontal,
};

@interface UIColor (Expanded)

/**
 * 随机颜色
 *
 * @return 颜色color
*/
+ (UIColor *)randomColor;


/**
 * 颜色方法
 *
 * @param hexString    颜色值
 *
 * @return 颜色color
*/
+ (UIColor *)colorFromARGB:(NSString *)hexString;

/**
 * 带有透明度的颜色
 *
 * @param hexString    颜色值
 * @param alpha  透明度
 *
 * @return 颜色color
*/
+ (UIColor *)colorFromARGB:(NSString *)hexString
                     alpha:(CGFloat)alpha;

/**
 * 渐变色
 *

 *
 * @return 颜色color
*/

+ (instancetype)colorGradientChangeWithSize:(CGSize)size
                                  direction:(IHGradientChangeDirection)direction
                                 startColor:(UIColor *)startcolor
                                   endColor:(UIColor *)endColor;

@end

NS_ASSUME_NONNULL_END
